﻿using System;

namespace VisionCloud.Domain.Common
{
    /// <summary>
    /// 指定性操作异常
    /// 此异常不会做记录日志 ,应用于各层的异常中断
    /// </summary>
    public class OperationException : Exception
    {
        public AjaxCode Code { get; set; } = AjaxCode.Error;

        public OperationException(string message) : base(message)
        {
        }

        public OperationException(Exception e) : base(e.Message)
        {
        }

        public OperationException(AjaxCode code, string message) : base(message)
        {
            Code = code;
        }

        public OperationException()
        {
        }

        public OperationException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
}